package application

import (
	"ruoyi/domain/entity/common"
	"ruoyi/domain/entity/response"
	"ruoyi/domain/entity/system"
	"ruoyi/domain/repository"
)

type NoticeApp struct {
	notice repository.SysNoticeRepository
}

var _ NoticeAppInterface = &NoticeApp{}

type NoticeAppInterface interface {
	SelectSysNoticeList(params common.SearchTableDataParam, isPage bool) common.TableDataInfo

	FindNoticeInfoById(noticeId string) system.SysNotice

	DeleteNotice(noticeIds string) response.Response

	UploadNotice(sysNotice system.SysNotice) response.Response

	SaveNotice(sysNotice system.SysNotice) response.Response
}

func (n *NoticeApp) SelectSysNoticeList(params common.SearchTableDataParam, isPage bool) common.TableDataInfo {
	return n.notice.SelectSysNoticeList(params, isPage)
}

func (n *NoticeApp) FindNoticeInfoById(noticeId string) system.SysNotice {
	return n.notice.FindNoticeInfoById(noticeId)
}

func (n *NoticeApp) DeleteNotice(noticeIds string) response.Response {
	return n.notice.DeleteNotice(noticeIds)
}

func (n *NoticeApp) UploadNotice(sysNotice system.SysNotice) response.Response {
	return n.notice.UploadNotice(sysNotice)
}

func (n *NoticeApp) SaveNotice(sysNotice system.SysNotice) response.Response {
	return n.notice.SaveNotice(sysNotice)
}
